UCF STIG Viewer Logo
Changes are coming to https://stigviewer.com. Take our survey to help us understand your usage and how we can better serve you in the future.
Take Survey

PostgreSQL must enforce access restrictions associated with changes to the configuration of PostgreSQL or database(s).


Overview

Finding ID Version Rule ID IA Controls Severity
V-214131 PGS9-00-009600 SV-214131r508027_rule Medium
Description
Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system. When dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can potentially have significant effects on the overall security of the system. Accordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purposes of initiating changes, including upgrades and modifications.
STIG Date
PostgreSQL 9.x Security Technical Implementation Guide 2021-06-04

Details

Check Text ( C-15347r361024_chk )
To list all the permissions of individual roles, as the database administrator (shown here as "postgres"), run the following SQL:

$ sudo su - postgres
$ psql -c "\du

If any role has SUPERUSER that should not, this is a finding.

Next, list all the permissions of databases and schemas by running the following SQL:

$ sudo su - postgres
$ psql -c "\l"
$ psql -c "\dn+"

If any database or schema has update ("W") or create ("C") privileges and should not, this is a finding.
Fix Text (F-15345r361025_fix)
Configure PostgreSQL to enforce access restrictions associated with changes to the configuration of PostgreSQL or database(s). 

Use ALTER ROLE to remove accesses from roles: 

$ psql -c "ALTER ROLE NOSUPERUSER" 

Use REVOKE to remove privileges from databases and schemas: 

$ psql -c "REVOKE ALL PRIVILEGES ON FROM "